import {Tools} from "weaver-mobile";

//获取二次验证的配置信息
export const getSecondAuthConfig = (params) => {
    return Tools.callApi({
        url: '/api/workflow/secondauth/getSecondAuthConfig',
        method: 'POST',
        params
    });
}

//批量提交时，获取二次验证的配置信息
export const getSecondAuthConfig4List = (params) => {
    return Tools.callApi({
        url: '/api/workflow/secondauth/getSecondAuthConfig4List',
        method: 'POST',
        params
    });
}

//获取动态密码
export const getDynamicPassword = params => {
    return Tools.callApi({
        url: '/api/workflow/secondauth/getDynamicPassword',
        method: 'POST',
        params
    });
}

//二次验证，主要是二次密码，动态令牌，动态密码的验证
export const doSecondAuth = params => {
    return Tools.callApi({
        url: '/api/workflow/secondauth/doSecondAuth',
        method: 'POST',
        params
    });
}

//保存CA认证的结果
export const saveCAAuthResult = params => {
    return Tools.callApi({
        url: '/api/workflow/secondauth/saveCAAuthResult',
        method: 'POST',
        params
    });
}

//验证保护的数据是否被篡改
export const checkProtectDatas = params => {
    return Tools.callApi({
        url: '/api/workflow/secondauth/checkProtectDatas',
        method: 'POST',
        params
    });
}

//获取被篡改的数据的信息
export const getTamperDatas = params => {
    return Tools.callApi({
        url: '/api/workflow/secondauth/getTamperDatas',
        method: 'POST',
        params
    });
}

//发送CA认证的消息
export const sendCAMessage = params => {
    return Tools.callApi({
        url: '/api/workflow/secondauth/sendCAMessage',
        method: 'POST',
        params
    });
}
